
function loadGeoInfo(geojson,map,marker)  {
	var info = "<div align=\"left\" style=\"overflow:X; font-size:12px\">" 
        + "<span style=\"font-size:14px\"><strong>" + "来访者信息" + "</strong></span><br />" 
        + "<strong>ＩＰ:</strong> &nbsp;" + geojson.ip + "<br />" 
        + "<strong>国家:</strong> &nbsp;" + geojson.country + "<br />" 
        + "<strong>省份:</strong> &nbsp;" + geojson.city + "<br />" 
        + "<strong>城市:</strong> &nbsp;" + geojson.region + "<br />" 
        + "<strong>经度:</strong> &nbsp;" + geojson.longitude + "<br />" 
        + "<strong>纬度:</strong> &nbsp;" + geojson.latitude + "<br />" 
        + "</div>";
	var point = new GLatLng(geojson.latitude, geojson.longitude);
    map.panTo(point);
    
    if(marker) {
      map.closeInfoWindow();
      map.removeOverlay(marker);
    }
    marker = new GMarker(point);
    map.addOverlay(marker);
    marker.openInfoWindowHtml(info);
}


function getGeoInfo(map,marker) {
	GDownloadUrl("/map/getuserloc/",function(data) {
		//alert(data);
		json=eval('(' + data + ')');
		if(json) {
			loadGeoInfo(json,map,marker);
		}
	}
	);
}
